<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>
<?php 
	$match_id = intval($_POST['match_id']);
	$MATCH = $this->match_entity->init('id', $match_id);
	$batsmanArray = unserialize($MATCH->getBatmanInfo());
	
	
	$name1= $r1 =$b1 = $name2 = $r2 = $b2 = '';
	if(isset($batsmanArray[0])){
		$name1= $batsmanArray[0]['batsman'];
		$r1= $batsmanArray[0]['r'];
		$b1= $batsmanArray[0]['b'];
	}
	if(isset($batsmanArray[1])){
		$name2= $batsmanArray[1]['batsman'];
		$r2= $batsmanArray[1]['r'];
		$b2= $batsmanArray[1]['b'];
	}
	
?>

<form action="<?php echo site_url('admin/dataman/match/batsman_submit');?>" name="batsman_submit" id="batsman_submit" method="post" enctype="multipart/form-data" >
	<input type="hidden" name="match_id" id="match_id" value="<?php echo $match_id;?>" />
	 
	<div class="grid2"><span class="bold">P 1:</span></div>
	<div class="grid8">
		Name:
		<input type="text" maxlength="255" id="name_home1" name="name_home1" value="<?php echo $name1;?>" style="width:185px;" />
		r:
		<input type="text" maxlength="255" id="r_home1" name="r_home1" value="<?php echo $r1;?>" style="width:45px;" />
		b:
		<input type="text" maxlength="255" id="b_home1" name="b_home1" value="<?php echo $b1;?>" style="width:45px;" />
	</div>
	<div class="clrboth"></div>
	
	<div class="grid2"><span class="bold">P 2:</span></div>
	<div class="grid8">
		Name:
		<input type="text" maxlength="255" id="name_home2" name="name_home2" value="<?php echo $name2;?>" style="width:185px;" />
		r:
		<input type="text" maxlength="255" id="r_home2" name="r_home2" value="<?php echo $r2;?>" style="width:45px;" />
		b:
		<input type="text" maxlength="255" id="b_home2" name="b_home2" value="<?php echo $b2;?>" style="width:45px;" />
	</div>
	<div class="clrboth"></div>	
	
	<div class="grid2" style="margin-top:10px;"><input type="button" class="button" value="Save" onclick="return do_save_batsman();" /> 
	<?php echo loader_image('id="loader_image" class="hidden"');?></div>
	<div class="clrboth"></div>	
	
</form>
